
import java.io.PrintWriter;

class ForStatement extends Statement {

	private Node exp1_;
	private Node exp2_;
	private Node exp3_;
	private Node block_;

	public ForStatement(Node e1, Node e2, Node e3, Node b) {
		exp1_ = e1;
		exp2_ = e2;
		exp3_ = e3;
		block_ = b;
	}

	@Override
	public void print(PrintWriter pw) {
		pw.println("Node name : ForStatement");
		// assert( exp_ && stat_list_);
		exp1_.print(pw);
		exp2_.print(pw);
		exp3_.print(pw);
		if (block_ != null) {
			block_.print(pw);
		}
	}


	public String translate(PrintWriter pw,String strPare){
		pw.print("for (");
		exp1_.translate(pw,"for");
		pw.print(";");
		exp2_.translate(pw,null);
		pw.print(";");
		exp3_.translate(pw,null);
		pw.print(")");
		block_.translate(pw,null);
		return null;
	}
}
